<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>pressure-update</title>
<!-- css and js -->
<link rel="stylesheet" href="../css/css1.css" type="text/css" />
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/validate.js"></script>
<script type="text/javascript">
<!--

function check() {
	alert('validate');
}

function complete() {

	//刷新父页面(为什么window.parent.reload()不行)
	window.opener.location.reload();
	window.close();
}
-->
</script>

<body>

<f:view>
<a4j:commandButton id="isAnyLoginedBtn" action="#{UserManagedBean.isAnyLogined }" style="display:none"></a4j:commandButton>

<a4j:form id="updateForm">
	<table id="updateTable" >
		<tr>
			<td><h:outputText value="low"/></td>
			<td><h:inputText id="low" size="6" value="#{BloodPressureManagedBean.pressure.low }" maxlength="3"/></td>
			<td><h:outputText value="high"/></td>
			<td><h:inputText id="high" size="6" value="#{BloodPressureManagedBean.pressure.high }" maxlength="3"/></td>
		</tr>
		<tr>
			<td><h:outputText value="remarks"/></td>
			<td colspan="3"><h:inputTextarea id="remarks" value="#{BloodPressureManagedBean.pressure.remarks }" cols="40" rows="4"></h:inputTextarea></td>
		</tr>
		<tr>
			<a4j:commandButton id="update" value="update"
							   onclick="check();"
							   action="#{BloodPressureManagedBean.updateByPK }"
							   reRender="updateTable,updateFlag"
							   oncomplete="complete();">
			</a4j:commandButton>
		</tr>
	</table>
</a4j:form>
</f:view>
</body>
</html>